import { getAction, deleteAction, putAction, postAction, httpAction, downFile } from '@/api/manage'

/*-----------访谈-----------*/
const serviceName = '/sjsk-detection-service'
const addInterviewRecordAppointment = (params) =>
  postAction(`${serviceName}/interviewRecord/addInterviewRecordAppointment`, params)
const cancelInterviewRecord = (params) => postAction(`${serviceName}/interviewRecord/cancelInterviewRecord`, params)
const inputInterviewRecord = (params) => postAction(`${serviceName}/interviewRecord/inputInterviewRecord`, params)
const interviewRecordDetail = (params) => getAction(`${serviceName}/interviewRecord/interviewRecordDetail/${params}`)
const interviewRecordDataTospecial = (params) =>
  getAction(`${serviceName}/interviewRecord/interviewRecordDataTospecial`, params)
const waitInterviewRecordList = (params) => getAction(`${serviceName}/interviewRecord/waitInterviewRecordList`, params)
const waitInterviewRecordListExportXls = (params) =>
  downFile(`${serviceName}/interviewRecord/waitInterviewRecordListExportXls`, params, 'post')
const interviewRecordStatistical = (params) =>
  getAction(`${serviceName}/interviewRecord/interviewRecordStatistical/${params}`)
const sjskInterviewStatistical = (params) =>
  getAction(`${serviceName}/interviewRecord/sjskInterviewStatistical`, params)
const completeInterviewList = (params) => getAction(`${serviceName}/interviewRecord/completeInterviewList`, params)
const completeInterviewListExportXls = (params) =>
  downFile(`${serviceName}/interviewRecord/completeInterviewListExportXls`, params, 'post')
const sjskInterviewData = (params) => postAction(`${serviceName}/interviewGroovy/sjskInterviewData`, params)
// 访谈分类
const addClassification = (params) => postAction(`${serviceName}/interviewClassification/addClassification`, params)
const classificationTree = (params) => getAction(`${serviceName}/interviewClassification/classificationTree`, params)
const deleteClassification = (params) =>
  postAction(`${serviceName}/interviewClassification/deleteClassification`, params)
const updateClassification = (params) =>
  postAction(`${serviceName}/interviewClassification/updateClassification`, params)
// 访谈模板
const InterviewTemplateDetail = (params) =>
  getAction(`${serviceName}/interviewTemplate/InterviewTemplateDetail/${params}`)
const addInterviewTemplate = (params) => postAction(`${serviceName}/interviewTemplate/addInterviewTemplate`, params)
const deleteInterviewTemplate = (params) =>
  postAction(`${serviceName}/interviewTemplate/deleteInterviewTemplate`, params)
const templateList = (params) => getAction(`${serviceName}/interviewTemplate/list`, params)
const updateInterviewTemplate = (params) =>
  postAction(`${serviceName}/interviewTemplate/updateInterviewTemplate`, params)
const InterviewClassificationDetail = (params) =>
  getAction(`${serviceName}/interviewTemplate/InterviewClassificationDetail/${params}`)

const sjskPersonList = (params) => getAction(`${serviceName}/legalAidConsult/sjskPersonList`, params)
const checkPlan = (params) => getAction(`${serviceName}/plan/checkPlan`, params)
export {
  addInterviewRecordAppointment,
  cancelInterviewRecord,
  inputInterviewRecord,
  interviewRecordDetail,
  interviewRecordDataTospecial,
  waitInterviewRecordList,
  waitInterviewRecordListExportXls,
  interviewRecordStatistical,
  sjskInterviewStatistical,
  completeInterviewList,
  completeInterviewListExportXls,
  sjskInterviewData,
  addClassification,
  classificationTree,
  deleteClassification,
  updateClassification,
  InterviewTemplateDetail,
  addInterviewTemplate,
  deleteInterviewTemplate,
  templateList,
  updateInterviewTemplate,
  InterviewClassificationDetail,
  sjskPersonList,
  checkPlan
}
